package com.it1997;

import com.it1997.component.UserTask;
import com.it1997.config.SpringConfig;
import com.it1997.mapper.UserMapper;
import lombok.extern.log4j.Log4j;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.scheduling.annotation.EnableScheduling;

import java.util.List;

/**
 * Hello world!
 *
 */

public class App {
    public static void main( String[] args ) {
        System.out.println( "Hello World!" );
        ApplicationContext applicationContext = new AnnotationConfigApplicationContext(SpringConfig.class);
        UserMapper userMapper = applicationContext.getBean(UserMapper.class);
        List<String> list = userMapper.selectUserId();
        UserTask userTask = applicationContext.getBean(UserTask.class);
        userTask.userTimeTask();

        System.out.println(list.toString());
    }
}
